package com.szrt.javaweb.menu.service.impl;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.szrt.javaweb.menu.dao.MenuDao;
import com.szrt.javaweb.menu.entity.MenuEntity;
import com.szrt.javaweb.menu.service.MenuService;

@Service
public class MenuServiceImpl implements MenuService {
	
	@Autowired
	private MenuDao dao;

	@Override
	public MenuEntity findById(int id) {
		System.out.println("dao=["+dao+"]");
		return dao.findById(id);
	}

	@Override
	public int add(MenuEntity entity) {
		 dao.add(entity);
		 
		 System.out.println("10086");
		 System.out.println(20/0);
		 return 1;
	}

	

	

}
